package com.ekuaitu.kuaitu.utils;

import android.content.Context;
import android.content.Intent;

import com.ekuaitu.kuaitu.activity.BikeInUseRedActivity;
import com.ekuaitu.kuaitu.activity.CarSettlementDetailActivity;
import com.ekuaitu.kuaitu.activity.SettlementActivity;
import com.ekuaitu.kuaitu.activity.BikeSettlementDetailActivity;
import com.ekuaitu.kuaitu.bean.SettlementBikeDetailBean;
import com.ekuaitu.kuaitu.bean.SettlementDetailBean;

/**
 * Created by jieyaozu on 2017/5/4.
 */

public class IntentUtils {
    public static void toBikeInUseActivity(Context context, String orderId) {
        Intent intent = new Intent(context, BikeInUseRedActivity.class);
        context.startActivity(intent);
    }

    /**
     * 去订单结算页面
     *
     * @param context
     * @param orderId
     * @param bikeId
     */
    public static void toSettlementActivity(Context context, String orderId, String bikeId) {
        Intent intent = new Intent(context, SettlementActivity.class);
        intent.putExtra(IntentKey.INTENT_ORDER_ID, orderId);
        intent.putExtra(IntentKey.INTENT_BIKE_ID, bikeId);
        context.startActivity(intent);
    }

    /**
     * 去订单详情页面(单车)
     *
     * @param context
     * @param orderId
     * @param bikeId
     */
    public static void toBikeSettlementDetailActivity(Context context, String orderId, String bikeId, SettlementBikeDetailBean settlementBikeDetailBean, String coupontitle, double couponPrice) {
        Intent intent = new Intent(context, BikeSettlementDetailActivity.class);
        intent.putExtra(IntentKey.INTENT_ORDER_ID, orderId);
        intent.putExtra(IntentKey.INTENT_BIKE_ID, bikeId);
        intent.putExtra(IntentKey.INTENT_SETTLEMENT_BIKE_DETAIL, settlementBikeDetailBean);
        intent.putExtra(IntentKey.INTENT_COUPONTITLE, coupontitle);
        intent.putExtra(IntentKey.INTENT_COUPONPRICE, couponPrice);
        context.startActivity(intent);
    }

    /**
     * 去订单详情页面(汽车)
     *
     * @param context
     * @param orderId
     */
    public static void toCarSettlementDetailActivity(Context context, String orderId, SettlementDetailBean settlementDetailBean, String coupontitle, double couponPrice) {
        Intent intent = new Intent(context, CarSettlementDetailActivity.class);
        intent.putExtra(IntentKey.INTENT_ORDER_ID, orderId);
        intent.putExtra(IntentKey.INTENT_SETTLEMENT_CAR_DETAIL, settlementDetailBean);
        intent.putExtra(IntentKey.INTENT_COUPONTITLE, coupontitle);
        intent.putExtra(IntentKey.INTENT_COUPONPRICE, couponPrice);
        context.startActivity(intent);
    }
}
